<?php 

namespace plugin\saiadmin\basic;

use think\Validate;
use support\Request;
use support\Response;
use plugin\saiadmin\app\cache\UserInfoCache;
use plugin\saiadmin\exception\ApiException;
use support\Log;

class BaseValidate extends Validate{

    public function getError(bool $withKey = false)
    {
        if ($withKey || count($this->error) > 1) {
            // 批量验证
            return $this->error;
        }
        return empty($this->error) ? '' : trans( array_values($this->error)[0] );
    }

}

